package org.example.types.common;


/**
 * @author yinghuashen
 * @version 1.0
 * @description
 * @date 2025/3/4 20:12
 */

public class RedisConstants {

    public static final String LOCK_PREFIX = "lock:";

    public static final Long LOGIN_CODE_TTL = 2L;
    public final static String LOGIN_CODE_PREFIX = "login:code:";

    public final static Long LOGIN_USER_TTL = 30 * 24 * 60L;
    public final static String LOGIN_USER_PREFIX = "login:token:";

    public final static Long LOGIN_TOKEN_TTL = LOGIN_USER_TTL;
    public final static String LOGIN_TOKEN_PREFIX = "login:phone:";

    public final static String PRODUCT_INFO_PREFIX = "product:info:";
    public final static String PRODUCT_STOCK_PREFIX = "product:stock:";
    public final static Long PRODUCT_INFO_TTL = 24 * 60L;
    public final static Long PRODUCT_STOCK_TTL = 24 * 60L;

    public final static String SECKILL_ORDER_PREFIX = "seckill:order:";
    public final static String SECKILL_STOCK_PREFIX = "seckill:stock:";
    public final static String SECKILL_RESULT_PREFIX = "seckill:result:";
    public final static Long SECKILL_RESULT_TTL = 24 * 60 * 60L;

    public final static String ORDER_SETTLEMENT_PREFIX = "order:settlement:";

    public final static String PAY_CALLBACK_LOCK_PREFIX = "lock:pay_callback:";
    public final static String REFUND_CALLBACK_LOCK_PREFIX = "lock:refund_callback:";

}
